<!doctype html>
<html lang="en">
 <head>
  <meta charset="UTF-8">
  <meta name="Generator" content="EditPlus®">
  <meta name="Author" content="">
  <meta name="Keywords" content="">
  <meta name="Description" content="">
  <title>Document</title>
 </head>
 <body>
  
 </body>
</html>
<script>
	//编写函数repeat(char,n) 实现重复char字符串n次
	//比如repeat("★",6) 返回"★★★★★★"
	function repeat(char, n){
		//******
		var str = ''; //=>'******'
		for(var i = 0; i < n; i++){
			str += char;
		};
		//最终返回一个字符串;
		return str;
	};

	console.log(repeat('*', 6));
</script>
